<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>假装是个破解版的腾讯视频</title>
		<meta name="referrer" content="never">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="/layui/css/layui.css" media="all">
		<style>
			.flow-default {
				width: auto;
				height: auto;
				overflow: auto;
				font-size: 0;
			}
			
			.flow-default li {
				display: inline-block;
				margin: 0 5px;
				font-size: 14px;
				width: 44%;
				margin-bottom: 10px;
				height: 44%;
				line-height: 200%;
				text-align: center;
				background-color: #eee;
			}
			
			.flow-default img {
				width: 100%;
				height: 100%;
			}
			
			.site-demo-flow {
				width: 600px;
				height: 300px;
				overflow: auto;
				text-align: center;
			}
			
			.site-demo-flow img {
				width: 40%;
				height: 200px;
				margin: 0 2px 5px 0;
				border: none;
			}
		</style>
	</head>

	<body>
		<div id="img_div">
			<img id="img_info" src="" width="100%" />
		</div>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
			<legend id="title">稍等一下下啦</legend>
		</fieldset>
		<ul class="flow-default" id="LAY_demo1"></ul>
		<script src="/layui/layui.js" charset="utf-8"></script>
		<script>
			layui.use('flow', function() {
				var flow = layui.flow;
				var $ = layui.jquery;
				flow.load({
					elem: '#LAY_demo1',
					scrollElem: '#LAY_demo1',
					done: function(page, next) {
						var lis = [];
						if(getRequest().type == "iqiyi") {
							$.get('/iqiyi/getTVInfo?aid=' + getRequest().aid + '&size=3350', function(res) {
								res = JSON.parse(res);
								layui.each(res.data.epsodelist, function(index, item) {
									$("#title").html(res.data.epsodelist[0].name.substr(0, (res.data.epsodelist[0].name.length - 3)))
									lis.push('<li onclick="window.open(&apos;https://vip.bljiex.com/?v=' + item.playUrl + '&apos;)"><span >' + item.order + '</span></li>')
								});
								next(lis.join(''), false);
								$("#img_info").attr("src", res.horizontal_pic_url);
								$("#img_div").html(" ");
							});
						} else if(getRequest().type == "tencent") {
							$.get('/tencent/getTVInfo?url=' + getRequest().url, function(res) {
								res = JSON.parse(res);
								layui.each(res.nomal_ids, function(index, item) {
									$("#title").html(res.title)
									lis.push('<li onclick="window.open(&apos;https://vip.bljiex.com/?v=https://v.qq.com/x/cover/' + getRequest().url.substring('https://v.qq.com/x/cover/'.length, 'https://v.qq.com/x/cover/mzc00200uj8xmtb'.length) + '/' + item.V + '.html&apos;)"><span >' + item.E + '</span></li>')
								});
								next(lis.join(''), false);
								$("#img_info").attr("src", res.horizontal_pic_url);
							});
						} else if(getRequest().type == "youku") {
							$.get('/youku/getTVInfo?url=' + getRequest().url, function(res) {
								res = JSON.parse(res);
								layui.each(res.data, function(index, item) {
									$("#title").html(res.title)
									lis.push('<li onclick="window.open(&apos;https://vip.bljiex.com/?v=' + item.href + '&apos;)"><span >' + item.id + '</span></li>')
								});
								next(lis.join(''), false);
								$("#img_info").attr("src", res.horizontal_pic_url);
							});
						}else if(getRequest().type == "mg") {
							$.get('/mg/getVideoInfo?partId=' + getRequest().partId+'&clipId='+getRequest().clipId, function(res) {
								res = JSON.parse(res);
								$("#title").html(res.data.collName)
								layui.each(res.data.list, function(index, item) {
									lis.push('<li onclick="window.open(&apos;https://vip.bljiex.com/?v=https://m.mgtv.com/b/' + item.clipId + '/' + item.partId + '.html'+ '&apos;)"><span >' + item.videoIndex + '</span></li>')
								});
								next(lis.join(''), false);
								$("#img_info").attr("src", res.horizontal_pic_url);
							});
						}

					}
				});

			});

			function getRequest() {
				var url = location.search; //获取url中"?"符后的字串
				var theRequest = new Object();
				if(url.indexOf("?") != -1) {
					var str = url.substr(1);
					strs = str.split("&");
					for(var i = 0; i < strs.length; i++) {
						theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
					}
				}
				return theRequest;
			}
		</script>

	</body>

</html>